gdk/wayland: Take transform into account when setting physical size
authorGuido Günther <agx@sigxcpu.org>
Wed, 5 May 2021 11:59:26 +0000 (13:59 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 5 May 2021 12:55:07 +0000 (14:55 +0200)
commite40c869d0dc9ba4037c3f3f256e0ef4544312cae
tree8face77a9c3b0348e1568bebaf78ee423c9b2b0a
parent65017a0031c9089d21ffee677a66e8a9b855fe52
gdk/wayland: Take transform into account when setting physical size

Width and height of a GdkMonitor are derived via wl_output which
talks about physical dimensions of a device and compositors usually
implement this as the untransformed values (e.g. weston, wlroots).

Since the GTK client has no way to figure out if a monitor was rotated,
transform the physical dimensions according to the applied wayland
transform to have the physical dimensions match the logical ones.

Mutter flips the physical dimensions itself but doesn't announce the
transform so this shouldn't break anything there.
gdk/wayland/gdkdisplay-wayland.c